using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class online_surveyMap : EntityTypeConfiguration<online_survey>
    {
        public online_surveyMap()
        {
            // Primary Key
            this.HasKey(t => t.online_survey_id);

            // Properties
            this.Property(t => t.online_survey_title)
                .HasMaxLength(20);

            this.Property(t => t.comments)
                .HasMaxLength(20);

            this.Property(t => t.survey_unit)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("online_survey");
            this.Property(t => t.online_survey_id).HasColumnName("online_survey_id");
            this.Property(t => t.online_survey_title).HasColumnName("online_survey_title");
            this.Property(t => t.single_select_count).HasColumnName("single_select_count");
            this.Property(t => t.multi_select_count).HasColumnName("multi_select_count");
            this.Property(t => t.input_count).HasColumnName("input_count");
            this.Property(t => t.status).HasColumnName("status");
            this.Property(t => t.start_date).HasColumnName("start_date");
            this.Property(t => t.end_date).HasColumnName("end_date");
            this.Property(t => t.comments).HasColumnName("comments");
            this.Property(t => t.survey_unit).HasColumnName("survey_unit");
        }
    }
}
